home *** CD-ROM | disk | FTP | other *** search
- on ShowTileViewer
- global TileFileSize
- set fileName to field "NameDisplay"
- if the machineType = 256 then
- set fPath to GetFilePath(fileName, "bmp")
- else
- set fPath to GetFilePath(fileName, "pic")
- end if
- ActivateViewer(fileName, fPath, TileFileSize)
- end
-
- on ShowBarViewer
- set fileName to field "NameDisplay"
- if the machineType = 256 then
- set fPath to GetFilePath(fileName, "bmp")
- else
- set fPath to GetFilePath(fileName, "pic")
- end if
- ActivateViewer(fileName, fPath)
- end
-
- on ShowBtnViewer
- set fileName to field "NameDisplay"
- if the machineType = 256 then
- set fPath to GetFilePath(fileName, "bmp")
- else
- set fPath to GetFilePath(fileName, "pic")
- end if
- ActivateViewer(fileName, fPath)
- end
-
- on noViewWarning
- set the puppet of sprite 20 to 1
- set oldCast to the castNum of sprite 20
- set the castNum of sprite 20 to the number of cast "NoViewWarn"
- updateStage()
- set dwellDone to the ticks + 90
- repeat while the ticks < dwellDone
- end repeat
- set the castNum of sprite 20 to oldCast
- updateStage()
- set the puppet of sprite 20 to 0
- end
-
- on ShowIconViewer
- global iconFileMode, PCwindowMode
- set fileName to field "NameDisplay"
- if the machineType = 256 then
- set f1Path to GetFilePath(fileName, "bmp")
- else
- set f1Path to GetFilePath(fileName, "pic")
- end if
- ActivateViewer(fileName, f1Path)
- end
-
- on ActivateViewer fileName, FullPathName, TileSize
- global LastImportBtn
- if LastImportBtn = 1 then
- set DepthSym to "2-" & string(the colorDepth)
- set LastImportBtn to 2
- else
- set DepthSym to "1-" & string(the colorDepth)
- set LastImportBtn to 1
- end if
- set BtnCastNum to the number of cast ("ButtonCast" & DepthSym)
- if the machineType = 256 then
- set the fileName of cast BtnCastNum to FullPathName
- if the fileName of cast BtnCastNum <> FullPathName then
- alert("Viewer failed to access file: " & FullPathName)
- end if
- else
- set the fileName of cast BtnCastNum to FullPathName
- if the fileName of cast BtnCastNum <> FullPathName then
- alert("Viewer failed to access file: " & FullPathName)
- end if
- end if
- set the picture of cast BtnCastNum to the picture of cast BtnCastNum
- put the width of cast BtnCastNum & ", " & the height of cast BtnCastNum into field "FileStats"
- put fileName into field "PreviewFileName"
- if the paramCount = 3 then
- if TileSize = 64 then
- if the width of cast BtnCastNum < 70 then
- DisplaySmallSquareTiles(BtnCastNum)
- else
- DisplaySmallRectTiles(BtnCastNum)
- end if
- else
- if the width of cast BtnCastNum < 134 then
- DisplayBigSquareTiles(BtnCastNum)
- else
- DisplayBigRectTiles(BtnCastNum)
- end if
- end if
- else
- displayimage(BtnCastNum)
- end if
- end
-
- on checkRAMspace FileToPreview
- if 1 then
- set F to the freeBytes
- set QTcast to the castNum of sprite 30
- unLoadCast(1, QTcast - 1)
- unLoadCast(QTcast + 1, the number of castMembers)
- put "Cast purge RAM freed: (before) " & F & " , (after) " & the freeBytes
- end if
- end
-
- on DragClickedSprite
- set ClickedOne to the clickOn
- set clickHandle to point(mouseH(), mouseV()) - the loc of sprite ClickedOne
- repeat while the mouseDown
- set the loc of sprite ClickedOne to point(mouseH(), mouseV()) - clickHandle
- updateStage()
- end repeat
- end
-
- on IsolateClickedTile
- set ClickedOne to the clickOn
- repeat with i = 24 to 43
- if i <> ClickedOne then
- set the visible of sprite i to 0
- end if
- end repeat
- updateStage()
- KillTicks(30)
- repeat while the mouseDown
- end repeat
- repeat with i = 24 to 43
- set the visible of sprite i to 1
- end repeat
- updateStage()
- end
-